class ScoreBoard():
    def __init__(self, image, pos = (0,0), size = (100,100)):
        self.baseimage = pygame.image.load(image)
        self.baseimage = pygame.transform.scale (self.baseimage, size)
        self.image = self.baseimage.copy()
        self.rect = self.image.get_rect()
        self.place(pos)
        self.score = 0
        font = pygame.font.Font(None, 48)
        text = font.render(str(self.score), 1, (255, 50, 0))
        textpos = (50,13)
        self.image.blit(text, textpos)

    def scorepoint(self):
        self.score += 1
        font = pygame.font.Font(None, 48)
        text = font.render(str(self.score), 1, (255, 50, 0))
        textpos = (50,13)
        self.image = self.baseimage.copy()
        self.image.blit(text, textpos)       
     
    def place(self, pt):
        self.rect.center = pt
        